﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>培训评价列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <link href="https://cdn.bootcss.com/amazeui/2.7.2/css/amazeui.css" rel="stylesheet" />
    <link href="http://s.amazeui.org/assets/2.x/css/amaze.min.css?v=ivneioml" rel="stylesheet" />
    <link href="css/common.css" rel="stylesheet" />
    <style>
        body {
            background: #f6f6f6;
        }

        .main {
            width: 100%;
        }

        .am-list-news-default .am-list .am-list-item-desced .am-list-item-text {
            margin-top: 0.2rem;
        }

        .am-list > li {
            border-top: none;
            margin-bottom: 0.1%;
        }

        .am-list-news-default {
            margin: 0;
        }
          .main-comment{
            background: #fff;
            width: 100%;
            overflow: hidden;
            margin-bottom: 3%;
        }
        .main-comment-info{
            padding: 2% 4%;
            width: 100%;
            overflow: hidden;
            padding-bottom: 0;
        }
        .comment-info-details{
            width: 100%;
            border-bottom:1px solid #cbcbcb;
        }
        .comment-details-top{
            overflow: hidden;
            width: 100%;
            padding: 2%;
            display: flex;
            align-items: center;
        }
        .comment-img{
            max-height: 50px;
            width: 20%;
            max-width: 50px;
            float: left;
        }
        .comment-img img{
            width: 100%;
            border-radius: 50%;
        }
        .comment-head{
            width: 80%;
            float: left;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 60px;
        }
        .comment-left{
            padding-left: 7%;
            overflow: hidden;
            width: 59%;
        }
        .comment-left span{
            display: block;
            color: #9a9a9a;
            font-size: 1.3rem;
            width: 100%;
        }
        .comment-right{
            color: #9a9a9a;
            font-size: 1.4rem;
        }
        .comment-details-bottom{
            overflow: hidden;
            width: 100%;
            padding: 2%;
            color: #9a9a9a;
            font-size: 1.4rem;
        }
    </style>
</head>
<body>
    <div class="page" id="page" v-cloak>
        <header data-am-widget="header" class="am-header am-header-default" style="background-color: #FFFFFF; border-bottom: 1px solid rgb(211, 211, 211);">
            <div class="am-header-left am-header-nav" onclick="goBack()">
                <a href="javascript:" class="">
                    <img class="am-header-icon-custom" src="images/veas07.png" alt="" />
                </a>
            </div>
            <h4 class="am-header-title" style=" color: black;">发布</h4>
            <div class="am-header-right am-header-nav"><a href="/Wap/Index.html" class="am-header-icon am-icon-home" style="color: #A9A9A9; "></a></div>
        </header>
        <div class="am-g">
            <div id="comment" class="main-comment">
                <button class="am-btn am-radius" style="color: rgb(255, 255, 255); font-size: 1.3rem; background: rgb(84, 222, 167); width:100%" v-on:click="fabupinglun()" v-if="signcount>0">发布评论</button>
                <div class="main-comment-info">
                    <div v-for="comment in venueList" class="comment-info-details">
                        <div class="comment-details-top">
                            <div class="comment-img">
                                <img v-bind:src="comment.Userg.headImg" alt="">
                            </div>
                            <div class="comment-head">
                                <div class="comment-left">
                                    <span style="color: #000;font-size: 1.6rem">{{comment.Userg.Name}}</span>
                                    <span>{{comment.date}}</span>
                                </div>
                            </div>
                        </div>
                        <div class="comment-details-bottom">
                            <span>{{comment.Evaluate.Info}}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div v-if="pageinfo.pageCount>page" class="am-list-news-ft" style="padding-bottom:15px;">
                <a class="am-list-news-more am-btn am-btn-default" v-on:click="page=page+1" href="javascript:void(0)">查看更多 &raquo;</a>
            </div>
            <div v-if="pageinfo.pageCount==page" class="am-list-news-ft" style="padding-bottom:15px;color:#757575;">
                无更多数据
            </div>
        </div>
    </div>
</body>
</html>
<script src="https://use.fontawesome.com/ca6b609d64.js"></script>
<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.js"></script>
<script src="js/common.js"></script>
<script src="https://cdn.bootcss.com/vue/2.5.9/vue.js"></script>
<script src="http://cdn.amazeui.org/amazeui/2.7.2/js/amazeui.min.js"></script>

<script>
    var page = new Vue({
        el: '#page',
        data: {
            venueid: "",
            venueList: [],
            page: 1,
            pagesize: 10,
            pageinfo: {},
            keyword: '',
            signcount:0,
        },
        methods: {
            getVenueList: function () {
                var that = this;
                $.ajax({
                    type: 'GET',
                    data: { page: that.page, pagesize: that.pagesize, keyword: that.keyword, gId: that.venueid },
                    url: window.apiUrl + '/Api/Field/GetTrainEvaluateList',
                    success: function (data) {
                        if (data.errcode == 0) {
                            if (that.page == 1) {
                                that.venueList = data.data.activityList;
                                that.signcount = data.data.signcount;
                                //console.log(that.venueList)
                            } else {
                                $(data.data.venueList).each(function () {
                                    that.venueList.push(this);
                                })
                            }
                            that.pageinfo = data.data.Page;
                        } else {
                            alert(data.errmsg);
                        }
                    }
                })
            },
            fabupinglun: function () {
                //var that = this;
                //$.ajax({
                //    type: 'post',
                //    data: { gId: that.venueid },
                //    url: window.apiUrl + '/Api/Field/chickTrainEvaluate',
                //    success: function (data) {
                //        if (data.errcode == 1) {
                                location.replace("TrainEvaluate.html?gId=" + this.venueid);
                //            } else {
                //            alert(data.errmsg);
                //        }
                //    }
                //})
            },
        },
        watch: {
            keyword: function () {
                this.page = 1;
                this.getVenueList();
            },
            page: function () {
                this.getVenueList();
            }
        }
    })
    $(function () {
        var actid = $.getParam("gId");
        page.venueid = actid;
        var keyword = $.getParam("keyword");
        if (keyword != null) {
            page.keyword = keyword;
        }
        page.page = 1;
        page.getVenueList();
    })
</script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/Content/js/wxconfig.js"></script>
<script>
    wx.ready(function () {
        wx.share("飞羽体育", "飞羽体育是一款关于订场app，主要目标人群是运动爱好者。功能包括GPS精准定位附近运动休闲娱乐场馆，为您提供方便、快捷的运动方式及参考，让你感受运动的快乐。", location.href, thisUrl + '/Wap/images/vult17.png');
    })
</script>
